<?php
$userid = $_SESSION["user"]["id"];
$arr = array(
	"comunication",
	"mechanic",
	"physical",
	"logic",
	"management",
	"activity",
	"creativity",
	"fatigue",
	"img",
	"water_contract",
	"gas_contract",
	"electricity_contract",
	"citizenship",
	"residence"
	);
$queries = "";
foreach ($arr as $key => $value){
	$queries .= $DB->get_query("select", "user", array($value), array("id"=>$userid)) . "; ";
}
	
$results = $DB->multiquery($queries)  or die("Error: " . $DB->error()); 
$results = array(
	"com"=>$results[0], 
	"mec"=>$results[1], 
	"phy"=>$results[2], 
	"log"=>$results[3], 
	"man"=>$results[4], 
	"act"=>$results[5],
	"cre"=>$results[6], 
	"fat"=>$results[7], 
	"img"=>$results[8], 
	"wat"=>$results[9], 
	"gas"=>$results[10], 
	"ele"=>$results[11], 
	"citizenship"=>$results[12], 
	"residence"=>$results[13]
	);
foreach ($results as $key => $value){
	while ($row = $DB->fetch_array($value)) {
		$_SESSION["user"][$key] = $row[0];
	}
}
//html vars
$com = $_SESSION["user"]["com"];
$mec = $_SESSION["user"]["mec"];
$phy = $_SESSION["user"]["phy"];
$log = $_SESSION["user"]["log"];
$man = $_SESSION["user"]["man"];
$act = $_SESSION["user"]["act"];
$cre = $_SESSION["user"]["cre"];
$fat = $_SESSION["user"]["fat"];
$img = $_SESSION["user"]["img"];
$water = $_SESSION["user"]["wat"];
$gas = $_SESSION["user"]["gas"];
$electricity = $_SESSION["user"]["ele"];
$citizenship = $_SESSION["user"]["citizenship"];
$residence = $_SESSION["user"]["residence"];
$user = $_SESSION["user"]["name"];

include("/../styles/html/home/main.php");
?>